package com.framework.service;

import com.baomidou.mybatisplus.service.IService;
import com.framework.entity.sys.SysAgent;
import com.framework.entity.tran.TranBenefitInfo;
import com.framework.entity.tran.TranTerBenefitInfo;
import com.framework.entity.tran.TranTransactionInfo;
import com.framework.page.PageUtils;
import com.framework.view.TranAmountView;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 功能描述: 分润明细接口
 * @author ck
 * @date 2018/8/28 19:46
 */
public interface BenefitInfoService extends IService<TranBenefitInfo> {
	/**
	 * 商户拓展天明细
	 * @param terminalType
	 * @param dayTime
	 * @param agentId
	 * @param deptId
	 * @param types
	 * @return
	 */
	List<TranAmountView> separatSelfDayList(Integer terminalType, String dayTime, Long agentId, Long deptId,Integer types);
	/**
	 * 商户拓展天明细 乐刷
	 * @param terminalType
	 * @param dayTime
	 * @param agentId
	 * @param deptId
	 * @param types
	 * @return
	 */
	List<Map<String,Object>>queryLeShuaDayList(Integer terminalType, String dayTime, Long agentId, Long deptId,Integer types);
	/**
	 * 交易走势图
	 * @param token
	 * @return
	 */
	Map<String,Object> queryTranChartMap(String token);

	/**
	 * 分润明细
	 * @param params
	 * @return
	 */
    PageUtils queryDetailByBenefitId(Map<String,Object> params);

	/**
	 * 添加分润详细信息
	 * @param tranTransactionInfo
	 * @param benefitAmount
	 * @param agent
	 * @param no
	 */
	void addSelfBenefitInfo(TranTransactionInfo tranTransactionInfo, BigDecimal benefitAmount, SysAgent agent, String no);

	/**
	 * 更迭分润详细 关于团队交易
	 * @param tranTerBenefitInfo
	 * @param teambenefit
	 * @param sysAgent
	 * @param benefitId
	 */
	void updateTeamTranInfo(TranTerBenefitInfo tranTerBenefitInfo, BigDecimal teambenefit, SysAgent sysAgent, String benefitId);


	/**
	 * 更新团队分润
	 * @param info
	 * @param benefitAmount
	 * @param sysAgent
	 * @param benefitId
	 */
	void updateTeamBenefitInfo(TranTerBenefitInfo info, BigDecimal benefitAmount, SysAgent sysAgent, String benefitId);

	/**
	 * 添加团队
	 * @param info
	 * @param pidBenefit
	 * @param pAgent
	 * @param benefitId
	 */
	void addBenefitInfo(TranTransactionInfo info, BigDecimal pidBenefit, SysAgent pAgent, String benefitId);

}

